﻿namespace Entity
{
    /*
     * 剪切板数据实体描述
     */
    [Serializable]
    public class ClipboardData
    {
        public ClipboardDataType Type { get; set; }
        public string Data { get; set; }

        public ClipboardData(ClipboardDataType type, string data)
        {
            this.Type = type;
            this.Data = data;
        }

        public override bool Equals(object? obj)
        {
            return obj is ClipboardData data &&
                   Type == data.Type &&
                   Data == data.Data;
        }

        public override int GetHashCode()
        {
            return HashCode.Combine(Type, Data);
        }
    }
}